﻿namespace Hardcodet.Wpf.TaskbarNotification
{
    using System;
    using System.Windows;

    internal static class RoutedEventHelper
    {
        internal static void a(DependencyObject A_0, RoutedEventArgs A_1)
        {
            if (A_0 is UIElement)
            {
                (A_0 as UIElement).RaiseEvent(A_1);
            }
            else if (A_0 is ContentElement)
            {
                (A_0 as ContentElement).RaiseEvent(A_1);
            }
        }

        internal static void a(DependencyObject A_0, RoutedEvent A_1, Delegate A_2)
        {
            UIElement element = A_0 as UIElement;
            if (element != null)
            {
                element.RemoveHandler(A_1, A_2);
            }
            else
            {
                ContentElement element2 = A_0 as ContentElement;
                if (element2 != null)
                {
                    element2.RemoveHandler(A_1, A_2);
                }
            }
        }

        internal static void b(DependencyObject A_0, RoutedEvent A_1, Delegate A_2)
        {
            UIElement element = A_0 as UIElement;
            if (element != null)
            {
                element.AddHandler(A_1, A_2);
            }
            else
            {
                ContentElement element2 = A_0 as ContentElement;
                if (element2 != null)
                {
                    element2.AddHandler(A_1, A_2);
                }
            }
        }
    }
}

